home *** CD-ROM | disk | FTP | other *** search
/ Essentials of Interactive Physiology / Essentials of Interactive Physiology.iso / pc / files / evaluation / evaluation.dcr / 00015_listParent.ls < prev    next >
Encoding:
Text File  |  2002-04-02  |  1.2 KB  |  56 lines

  1. property piClickedLine, psLineText, psText, psMember, pkMySprite, poOwner, pMyID
  2.  
  3. on new me, xiSprite, xsMember, xoOwner, xMyId
  4.   pkMySprite = xiSprite
  5.   psMember = xsMember
  6.   psLineText = EMPTY
  7.   psText = member(xsMember).text
  8.   poOwner = xoOwner
  9.   piClickedLine = 0
  10.   pMyID = xMyId
  11.   return me
  12. end
  13.  
  14. on mouseUpOutSide me
  15.   piClickedLine = 0
  16.   hilite line 10000 of field psMember
  17. end
  18.  
  19. on stepFrame me
  20.   if (the stillDown = 1) and (the clickOn = pkMySprite) then
  21.     if (the mouseLine <> piClickedLine) and (the mouseLine > 0) then
  22.       piClickedLine = the mouseLine
  23.       hilite line piClickedLine of field psMember
  24.       vsTheWord = line piClickedLine of field psMember
  25.       if vsTheWord <> EMPTY then
  26.         psLineText = vsTheWord
  27.       end if
  28.     end if
  29.   else
  30.     if (the clickOn = pkMySprite) and (piClickedLine > 0) and (the mouseMember = the member of sprite pkMySprite) then
  31.       piClickedLine = 0
  32.       mNotify(poOwner, #scrollingList, pMyID)
  33.     end if
  34.   end if
  35. end
  36.  
  37. on mGetLine me
  38.   return psLineText
  39. end
  40.  
  41. on mGetLinePos me
  42.   return piClickedLine
  43. end
  44.  
  45. on mSetText me, xsText
  46.   psText = xsText
  47. end
  48.  
  49. on mHide me
  50.   sprite(pkMySprite).visible = 0
  51. end
  52.  
  53. on mShow me
  54.   sprite(pkMySprite).visible = 1
  55. end
  56.